<!DOCTYPE html>
<html lang="en"><html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>个人中心</title>
    <link rel="stylesheet" href="/css/bootstrap.min.css">
    <link rel="stylesheet" href="/css/bootstrap-theme.min.css">
    <link rel="stylesheet" href="/css/communtiy.css">
    <script src="https://www.jq22.com/jquery/jquery-3.3.1.js"></script>
    <script src="/js/bootstrap.min.js" type="application/javascript"></script>
    <script src="/js/selfjs.js" type="application/javascript"></script>
    <script src="https://cdn.bootcss.com/timeago.js/3.0.2/timeago.js"></script>

</head>
<body>
<div th:insert="~{navaigation::nav}"></div>

<div class="container-fluid self_main">
    <div class="row">
        <div class="col-lg-9 col-md-12 col-sm-12 col-sm-12 col-xs-12">
           <span class="glyphicon glyphicon-cog" aria-hidden="true" style="font-size: 25px;">用户中心</span>
            <hr class="col-lg-12 col-md-12 col-sm-12 col-sm-12 col-xs-12">
            <div>
                <div class="col-lg-12 col-md-12 col-sm-12 col-sm-12 col-xs-12 ">

                    <span class="self_mes" aria-hidden="true" data-toggle="tooltip" data-placement="bottom" title="等级是一种荣誉的象征">
                        <span class="  glyphicon glyphicon-user "></span>
                        等级：<span th:text="${'Lv:'+user.getLeave()}"></span>
                    </span>
                    <span class="self_mes" aria-hidden="true" data-toggle="tooltip" data-placement="bottom" title="经验是升级的必要条件">
                        <span class="  glyphicon glyphicon-circle-arrow-up "></span>
                        经验：<span th:if="${user.getExp()>=0 && user.getExp()<100}" th:text="${user.getExp()+'/100'}"></span>
                        <span th:if="${user.getExp()>=100 && user.getExp()<300}" th:text="${user.getExp()+'/300'}"></span>
                        <span th:if="${user.getExp()>=300 && user.getExp()<500}" th:text="${user.getExp()+'/500'}"></span>
                        <span th:if="${user.getExp()>=500 && user.getExp()<1000}" th:text="${user.getExp()+'/1000'}"></span>
                        <span th:if="${user.getExp()>=1000}" th:text="${user.getExp()+'/99999'}"></span>

                    </span>
                    <span class="self_mes" aria-hidden="true" data-toggle="tooltip" data-placement="bottom" title="威望是升级必要的条件">
                        <span class="glyphicon glyphicon-tower "></span>
                        威望：<span th:text="${user.getWeiwang()}"></span>
                    </span>
                    <span class="self_mes" aria-hidden="true" data-toggle="tooltip" data-placement="bottom" title="积分可以用于提问悬赏等操作">
                        <span class="glyphicon glyphicon-dashboard "aria-hidden="true"></span>
                        积分：<span th:text="${user.getJifen()}"></span>
                    </span>

                    <span class="self_mes" aria-hidden="true" data-toggle="tooltip" data-placement="bottom" title="积分可以用于提问悬赏等操作">
                        <span class="glyphicon glyphicon-stats "aria-hidden="true"></span>
                        排名：<span th:text="${user.getWeek_ranking()}"></span>
                    </span>
                    <span class="self_mes"data-toggle="tooltip" data-placement="bottom" title="被关注的数量">
                        <span class="glyphicon glyphicon-heart-empty "aria-hidden="true"></span>
                        粉丝：<span  th:text="${user.getFensi_count()}"></span>
                    </span>

                </div>
                <hr class="col-lg-12 col-md-12 col-sm-12 col-sm-12 col-xs-12">
                <div class="col-lg-12 col-md-12 col-sm-12 col-sm-12 col-xs-12">
                    <ul id="myTab" class="nav nav-tabs" role="tablist">
                        <li  th:class="${activeshow=='myGuanzhu'?'active self_fontsize':'self_fontsize'}">
                            <a href="#myGuanzhu" role="tab" data-toggle="tab">我的关注</a>
                        </li>
                        <li th:class="${activeshow=='myFensi'?'active self_fontsize':'self_fontsize'}">
                            <a href="#myFensi" role="tab" data-toggle="tab">我的粉丝</a>
                        </li>
                        <li th:class="${activeshow=='loveQuesions'?'active self_fontsize':'self_fontsize'}">
                            <a href="#loveQuesions" role="tab"  data-toggle="tab">文章收藏</a>
                        </li>
                        <li th:class="${activeshow=='myComment'?'active self_fontsize':'self_fontsize'}">
                            <a href="#myComment" role="tab" data-toggle="tab">我的胸章</a>
                        </li>
                        <li th:class="${activeshow=='myFriends'?'active self_fontsize':'self_fontsize'}">
                            <a href="#myFriends" role="tab" data-toggle="tab">好友申请</a>
                        </li>
                        <li th:class="${activeshow=='recentDyamics'?'active self_fontsize':'self_fontsize'}">
                            <a href="#recentDyamics" role="tab" data-toggle="tab">最近动态</a>
                        </li>




                    </ul>
                    <!-- 选项卡面板 -->
                    <div id="myTabContent" class="tab-content">
                       <!-- 我的关注-->
                        <div th:class="${activeshow=='myGuanzhu'?'active tab-pane col-lg-12 col-md-12 col-sm-12 col-sm-12 col-xs-12':'tab-pane col-lg-12 col-md-12 col-sm-12 col-sm-12 col-xs-12'}" id="myGuanzhu">
                            <div th:if="${myguanzhu!=null}" class="media col-lg-6 col-md-12 col-sm-12 col-sm-12 col-xs-12" th:each="save:${myguanzhu}" style="margin-top: 10px;">
                                <div class="media-left">
                                    <a href="#">
                                        <img class="media-object" th:src="${save.getUsers().getAvatarUrl()}" style="height: 50px;width: 50px;">
                                    </a>
                                </div>
                                <div class="media-body">
                                    <h4 class="media-heading">
                                        <span aria-hidden="true" style="color: #9b9b6a" class="glyphicon glyphicon-user replies" th:text="${save.getUsers().getName()}"></span>
                                        <span th:text="${'等级Lv:'+save.getUsers().getLeave()}" class="replies self_leave"></span>
                                        <span class=" replies self_leave" aria-hidden="true" th:text="${'威望：'+save.getUsers().getWeiwang()}" ></span>
                                        <span class="glyphicon glyphicon-heart replies self_leave" aria-hidden="true" th:text="${save.getUsers().getFensi_count()+'人关注'}" ></span>
                                        <span th:text="${'关注时间:'+#dates.format(save.getGmt_create(),'yyyy-MM-dd')}"  class="glyphicon glyphicon-time self_leave" aria-hidden="true"></span>
                                        <a th:href="@{/selfs/(delMyGuanzhu=${save.getUsers().getId()},tags='myGuanzhu')}">
                                            <button type="button" class="btn btn-outline-danger self_btn">取消关注</button>

                                        </a>
                                    </h4>
                                </div>
                                <hr class="col-lg-12 col-md-12 col-sm-12 col-sm-12 col-xs-12">
                            </div>
                            <!--分页信息-->
                            <nav aria-label="..." th:if="${myguanzhu.size()!=0}"class="col-lg-12 col-md-12 col-sm-12 col-sm-12 col-xs-12">
                                <ul class="pager">
                                    <li class="">
                                        <a th:href="@{/selfs/(page=1,tags='myGuanzhu')}" aria-label="Previous">首页
                                        </a>
                                    </li>
                                    <li class="">
                                        <a th:if="${myguanzhu.get(0).getPage()!=1}" th:href="@{/selfs/(page=${myguanzhu.get(0).getPage()-1},tags='myGuanzhu')}">上一页</a>
                                        <a th:if="${myguanzhu.get(0).getPage()==1}" href="#" class="disabled">上一页</a>
                                    </li>
                                    <li class="">
                                        <a th:if="${myguanzhu.get(0).getPage()!=myguanzhu.get(0).getCountPage()}" th:href="@{/selfs/(page=${myguanzhu.get(0).getPage()+1},tags='myGuanzhu')}">下一页</a>
                                        <a th:if="${myguanzhu.get(0).getPage()==myguanzhu.get(0).getCountPage()}" href="#" class="disabled">下一页</a>

                                    </li>
                                    <li class="">
                                        <a  th:href="@{/selfs/(page=${myguanzhu.get(0).getCountPage()},tags='myGuanzhu')}">尾页</a>
                                    </li>

                                </ul>
                            </nav>
                            <div th:if="${myguanzhu.size()==0}" class="col-lg-12 col-md-12 col-sm-12 col-sm-12 col-xs-12">
                                <h3 style="text-align: center">亲,你现在还没有关注他人</h3>
                                <img src="/img/noaction.jpg" style="height: 300px;width: 300px;margin-left: 180px;">
                            </div>
                        </div>

                        <!--粉丝-->
                        <div th:class="${activeshow=='myFensi'?'active tab-pane col-lg-12 col-md-12 col-sm-12 col-sm-12 col-xs-12':'tab-pane col-lg-12 col-md-12 col-sm-12 col-sm-12 col-xs-12'}" id="myFensi">
                            <div th:if="${guanzhuUsersDtoList!=null}" class="media col-lg-6 col-md-12 col-sm-12 col-sm-12 col-xs-12" th:each="guanzhuList:${guanzhuUsersDtoList}" style="margin-top: 10px;">
                                <div class="media-left">
                                    <a  th:href="@{'/othermes/'+${guanzhuList.getUsers().getId()}}">
                                        <img class="media-object" th:src="${guanzhuList.getUsers().getAvatarUrl()}" style="height: 50px;width: 50px;">
                                    </a>
                                </div>
                                <div class="media-body">
                                    <h4 class="media-heading">
                                        <span aria-hidden="true" style="color: #9b9b6a" class="glyphicon glyphicon-user replies" th:text="${guanzhuList.getUsers().getName()}"></span>
                                        <span th:text="${'等级：Lv'+guanzhuList.getUsers().getLeave()}" class="replies"></span>
                                        <span th:text="${'积分：'+guanzhuList.getUsers().getJifen()}" class="replies"></span>
                                        <span th:text="${'关注时间:'+#dates.format(guanzhuList.getGmt_create(),'yyyy-MM-dd')}" style="font-size: 10px;margin-top: 5px;" class="glyphicon glyphicon-time" aria-hidden="true"></span>
                                    </h4>
                                   签名： <span th:text="${guanzhuList.getUsers().getSignature()}" style="margin-top: 5px;font-size: 8px;"></span>
                                </div>
                                <hr class="col-lg-12 col-md-12 col-sm-12 col-sm-12 col-xs-12">

                            </div>
                            <div th:if="${guanzhuUsersDtoList.size()==0}" class="media col-lg-12 col-md-12 col-sm-12 col-sm-12 col-xs-12"  style="margin-top: 10px;">
                                   <h3 style="text-align: center">亲,你还没有粉丝哦！多多发有质量的帖可以获得粉丝</h3>
                                    <img src="/img/noaction.jpg" style="height: 300px;width: 300px;margin-left: 180px;">
                            </div>
                            <!--分页信息-->
                            <nav aria-label="..." th:if="${guanzhuUsersDtoList.size()!=0}"class="col-lg-12 col-md-12 col-sm-12 col-sm-12 col-xs-12">
                                <ul class="pager">
                                    <li class="">
                                        <a th:href="@{/selfs/(page=1,tags='myFensi')}" aria-label="Previous">首页
                                        </a>
                                    </li>
                                    <li class="">
                                        <a th:if="${guanzhuUsersDtoList.get(0).getPage()!=1}" th:href="@{/selfs/(page=${guanzhuUsersDtoList.get(0).getPage()-1},tags='myFensi')}">上一页</a>
                                        <a th:if="${guanzhuUsersDtoList.get(0).getPage()==1}" href="#" class="disabled">上一页</a>
                                    </li>
                                    <li class="">
                                        <a th:if="${guanzhuUsersDtoList.get(0).getPage()!=guanzhuUsersDtoList.get(0).getCountPage()}" th:href="@{/selfs/(page=${guanzhuUsersDtoList.get(0).getPage()+1},tags='myFensi')}">下一页</a>
                                        <a th:if="${guanzhuUsersDtoList.get(0).getPage()==guanzhuUsersDtoList.get(0).getCountPage()}" href="#" class="disabled">下一页</a>

                                    </li>
                                    <li class="">
                                        <a  th:href="@{/selfs/(page=${guanzhuUsersDtoList.get(0).getCountPage()},tags='myFensi')}">尾页</a>
                                    </li>

                                </ul>
                            </nav>
                        </div>
                        <!--文章收藏-->
                        <div th:class="${activeshow=='loveQuesions'?'active tab-pane col-lg-12 col-md-12 col-sm-12 col-sm-12 col-xs-12':'tab-pane col-lg-12 col-md-12 col-sm-12 col-sm-12 col-xs-12'}" id="loveQuesions">
                            <div th:if="${saveUsersQuesionDatoes!=null}" class="media col-lg-6 col-md-12 col-sm-12 col-sm-12 col-xs-12" th:each="save:${saveUsersQuesionDatoes}" style="margin-top: 10px;">
                                <div class="media-left">
                                    <a href="#">
                                        <img class="media-object" th:src="${save.getUsers().getAvatarUrl()}" style="height: 50px;width: 50px;">
                                    </a>
                                </div>
                                <div class="media-body">
                                    <h4 class="media-heading">
                                        <span aria-hidden="true" style="color: #9b9b6a" class="glyphicon glyphicon-user replies" th:text="${save.getUsers().getName()}"></span>
                                        <span th:text="${'等级Lv:'+save.getUsers().getLeave()}" class="replies self_leave"></span>
                                        <span class="glyphicon glyphicon-eye-open replies self_leave" aria-hidden="true" th:text="${'浏览数：'+save.getQuesions().getView_count()}" ></span>
                                        <span class="glyphicon glyphicon-heart replies self_leave" aria-hidden="true" th:text="${save.getQuesions().getLike_count()+'人收藏'}" ></span>
                                        <span th:text="${'发帖时间:'+#dates.format(save.getQuesions().getGmt_create(),'yyyy-MM-dd')}"  class="glyphicon glyphicon-time self_leave" aria-hidden="true"></span>
                                       <a th:href="@{/selfs/(del=${save.getQuesions().getId()},tags='loveQuesions')}">
                                           <span class="glyphicon glyphicon-trash"aria-hidden="true" style="color: darkred;float: right"></span>
                                       </a>
                                    </h4>
                                    标题：
                                    <a th:href="@{'/quesion/'+${save.getQuesions().getId()}}">
                                         <span th:text="${save.getQuesions().getTitle()}" style="margin-top: 5px"></span>
                                    </a>
                                </div>
                                <hr class="col-lg-12 col-md-12 col-sm-12 col-sm-12 col-xs-12">
                            </div>
                            <!--分页信息-->
                            <nav aria-label="..." th:if="${saveUsersQuesionDatoes.size()!=0}"class="col-lg-12 col-md-12 col-sm-12 col-sm-12 col-xs-12">
                                <ul class="pager">
                                    <li class="">
                                        <a th:href="@{/selfs/(page=1,tags='loveQuesions')}" aria-label="Previous">首页
                                        </a>
                                    </li>
                                    <li class="">
                                        <a th:if="${saveUsersQuesionDatoes.get(0).getPage()!=1}" th:href="@{/selfs/(page=${saveUsersQuesionDatoes.get(0).getPage()-1},tags='loveQuesions')}">上一页</a>
                                        <a th:if="${saveUsersQuesionDatoes.get(0).getPage()==1}" href="#" class="disabled">上一页</a>
                                    </li>
                                    <li class="">
                                        <a th:if="${saveUsersQuesionDatoes.get(0).getPage()!=saveUsersQuesionDatoes.get(0).getCountPage()}" th:href="@{/selfs/(page=${saveUsersQuesionDatoes.get(0).getPage()+1},tags='loveQuesions')}">下一页</a>
                                        <a th:if="${saveUsersQuesionDatoes.get(0).getPage()==saveUsersQuesionDatoes.get(0).getCountPage()}" href="#" class="disabled">下一页</a>

                                    </li>
                                    <li class="">
                                        <a  th:href="@{/selfs/(page=${saveUsersQuesionDatoes.get(0).getCountPage()},tags='loveQuesions')}">尾页</a>
                                    </li>

                                </ul>
                            </nav>
                            <div th:if="${saveUsersQuesionDatoes.size()==0}" class="col-lg-12 col-md-12 col-sm-12 col-sm-12 col-xs-12">
                                <h3 style="text-align: center">亲,你现在还没有收藏文章</h3>
                                <img src="/img/noaction.jpg" style="height: 300px;width: 300px;margin-left: 180px;">
                            </div>
                        </div>

                        <!--我的胸罩-->
                        <div th:class="${activeshow=='myComment'?'active tab-pane col-lg-12 col-md-12 col-sm-12 col-sm-12 col-xs-12':'tab-pane col-lg-12 col-md-12 col-sm-12 col-sm-12 col-xs-12'}" id="myComment">
                            <div th:each="xunZhangs:${otherMesDtos3}" class="col-lg-4 col-md-12 col-sm-12 col-sm-12 col-xs-12 " >
                                <img class="self_xunzhang3"   th:src="${xunZhangs.getXunZhang().getImages()}"  data-toggle="tooltip" data-placement="top" th:title="${xunZhangs.getXunZhang().getDescript()}" >
                                <button  onclick="getXunzhang(this)" th:id="${session.user.getId()+'-'+xunZhangs.getXunZhang().getId()+'-'+xunZhangs.getIsGetXunzhang()}" data-toggle="modal" data-target="#myModal"   th:if="${xunZhangs.getIsGetXunzhang()==true}" class="btn-receive">已领取</button>
                                <button  onclick="getXunzhang(this)" th:id="${session.user.getId()+'-'+xunZhangs.getXunZhang().getId()+'-'+xunZhangs.getIsGetXunzhang()}"data-toggle="modal" data-target="#myModal" th:if="${xunZhangs.getIsGetXunzhang()==false}" class="btn-receive" style="background-color: #5f77c0">未领取</button>
                                <br> <b style="margin-left: 10px;" th:text="${xunZhangs.getXunZhang().getName()}"></b>
                            </div>
                        </div>
                        <!--我的好友-->
                        <div th:class="${activeshow=='myFriends'?'active tab-pane col-lg-12 col-md-12 col-sm-12 col-sm-12 col-xs-12':'tab-pane col-lg-12 col-md-12 col-sm-12 col-sm-12 col-xs-12'}" id="myFriends">
                            <div class="div_scroll2 col-lg-12 col-md-12 col-sm-12 col-sm-12 col-xs-12" th:if="${dongtais.size()!=0}" style="overflow-x: hidden">
                               <div id="showMyFriends" th:each="friends:${friendsUserList}" th:if="${friendsUserList.size()!=0 and friends.getAddFriend().isAgree==0}" class="col-lg-12 col-md-12 col-sm-12 col-sm-12 col-xs-12">
                                   <div class="media" style="margin-top: 20px;">
                                       <div class="media-left">
                                           <a href="#">
                                               <img class="media-object img-circle" th:src="${friends.getUsers().getAvatarUrl()}" style="height: 50px;width: 50px;">
                                           </a>
                                       </div>
                                       <div class="media-body">
                                           <h4 class="media-heading">
                                               <span aria-hidden="true" style="color: #9b9b6a" class="glyphicon glyphicon-user replies" th:text="${friends.getUsers().getName()}"></span>
                                               <span th:text="${'等级Lv:'+friends.getUsers().getLeave()}" class="replies self_leave"></span>
                                               <span class=" replies self_leave" aria-hidden="true" th:text="${'威望：'+friends.getUsers().getWeiwang()}" ></span>
                                               <span class="glyphicon glyphicon-heart replies self_leave" aria-hidden="true" th:text="${friends.getUsers().getFensi_count()+'人关注'}" ></span>

                                           </h4>
                                           <span th:text="${'时间:'+#dates.format(friends.getAddFriend().getGmt_create(),'yyyy-MM-dd')}"  class="glyphicon glyphicon-time self_leave" aria-hidden="true"></span>
                                           <button  value="no" onclick="isAgreenFriend(this)"th:id="${friends.getAddFriend().getUserId()}" th:if="${friends.getAddFriend().getIsAgree()==0 and friends.getAddFriend().getFriendId()==session.user.getId()}" type="button" class="btn btn-outline-danger self_btn" style="float: right">拒绝</button>
                                           <button value="yes"  onclick="isAgreenFriend(this)"th:id="${friends.getAddFriend().getUserId()}" th:if="${friends.getAddFriend().getIsAgree()==0 and friends.getAddFriend().getFriendId()==session.user.getId()}"type="button" class="btn btn-outline-danger self_btn1" style="float: right">同意</button>

                                       </div>
                                   </div>
                               </div>

                                <div th:if="${friendsUserList.size()==0}">
                                    <div th:if="${saveUsersQuesionDatoes.size()==0}" class="col-lg-12 col-md-12 col-sm-12 col-sm-12 col-xs-12">
                                        <h3 style="text-align: center">亲,你现在没有申请任何好友</h3>
                                        <img src="/img/noaction.jpg" style="height: 300px;width: 300px;margin-left: 180px;">
                                    </div>
                                </div>

                            </div>
                        </div>
                        <!--申请我的好友-->
                        <!--最近动态-->
                        <div th:class="${activeshow=='recentDyamics'?'active tab-pane col-lg-12 col-md-12 col-sm-12 col-sm-12 col-xs-12':'tab-pane col-lg-12 col-md-12 col-sm-12 col-sm-12 col-xs-12'}" id="recentDyamics">
                            <div class="div_scroll2 col-lg-12 col-md-12 col-sm-12 col-sm-12 col-xs-12" th:if="${dongtais.size()!=0}" style="overflow-x: hidden">
                                <div style="margin-top: 20px;" th:each="dongtai ,dt:${dongtais}" class="col-lg-12 col-md-12 col-sm-12 col-sm-12 col-xs-12">
                                    <div class="col-lg-12 col-md-12 col-sm-12 col-sm-12 col-xs-12">
                                        <b><span style="font-size: 20px;color: black;margin-right: 10px;" th:text="${dt.index+1}"></span></b>
                                        <span style="font-size: 18px;color: gray" th:text="${dongtai.getContent()}"></span>
                                        <span class="glyphicon glyphicon-time"aria-hidden="true"style="float:right;"><span class="time" th:datetime="${dongtai.getGmt_create()}" ></span></span>
                                    </div>

                                </div>
                            </div>
                            <div th:if="${dongtais.size()==0}">
                                <div th:if="${saveUsersQuesionDatoes.size()==0}" class="col-lg-12 col-md-12 col-sm-12 col-sm-12 col-xs-12">
                                    <h3 style="text-align: center">亲,你现在没有任何动态哦</h3>
                                    <img src="/img/noaction.jpg" style="height: 300px;width: 300px;margin-left: 180px;">
                                </div>
                            </div>
                        </div>

                    </div>
                </div>
            </div>
        </div>

        <!--个人资料-->
        <div class="col-lg-3 col-md-12 col-sm-12 col-sm-12 col-xs-12">
            <ul class="nav nav-tabs">
                <li role="presentation">
                    <a th:href="@{'/othermes/'+${user.getId()}}">我的信息卡片</a>
                </li>
            </ul>
            <div class="col-lg-12 col-md-12 col-sm-12 col-sm-12 col-xs-12">
                <p id="url"><img  class="img-circle" th:src="${user.getAvatarUrl()}" style="width: 100px;height: 100px;margin-left: 50px;"></p>
            <!---ajax图片上传-->
                <input type="file" name="editormd-image-file" id="file">

                <div style="margin-left: 10px;">
                    <div class="self_sonfontSize">
                        昵称：
                            <input type="text" th:value="${user.getName()}" class="form-control" id="modifiedName" placeholder="请填写你的昵称">
                            <span id="hasName" style="color: red"></span>

                    </div>
                    <div class="self_sonfontSize">
                        签名：  <textarea  th:text="${user.getSignature()}" class="form-control" id="signature" placeholder="可以填写上你的签名"></textarea>

                    </div>

                    <div class="self_sonfontSize"th:if="${#strings.contains(user.getAccount_id(),'@qq.com')}">
                      邮箱：  <input type="email" th:value="${user.getAccount_id()}" class="form-control" id="inputEmail4" placeholder="这是你的邮箱，不可更改" readonly="readonly">

                    </div>

                    <div class="self_sonfontSize" th:if="${#strings.contains(user.getAccount_id(),'@qq.com')}">
                        <span >密码：
                            <span id="lookPass" class="glyphicon glyphicon-eye-open" aria-hidden="true" style="color: red"></span>
                        </span>
                        <input type="text" class="form-control" id="lookPass2" readonly="readonly" placeholder="点击小眼睛去邮箱接受验证码">

                    </div>
                    <div class="self_sonfontSize" th:if="${!#strings.contains(user.getAccount_id(),'@qq.com')}">
                        <textarea  readonly="readonly" class="form-control"  placeholder="你是Github授权用户，请你自己去Github修改密码即可"></textarea>

                    </div>
                </div>


                <input style="margin-left: 50px;" type="button" id="button"  class="btn btn-success self_sonfontSize" value="提交修改信息" >
            </div>
           <!-- <div class="self_sonfontSize">
                <span>头像：</span>
                <form action="/file/upload" method="post" enctype="multipart/form-data">
                    <input type="file" name="editormd-image-file">
                    <input type="submit" value="上传"/>
                </form>

            </div>-->
        </div>
    </div>

    <!--模态-->
    <!-- Button trigger modal -->
    <!-- Modal -->
    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="myModalLabel">勋章简介</h4>
                </div>
                <div class="modal-body">
                    <div >
                        <p style="text-align: center" class="bi_name" id="badgeName">富甲一方L</p>
                        <div class="bi_tishi" style="margin-left:220px;" id="getHasCount">
                            已经有多少获取
                        </div>
                        <img  id="xunImage" src="" class="bi_image">
                        <br>
                        <div class="progress bi_jindu">
                            <div class="progress-bar" id="jindu_show" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="width: 0%;">
                                100%
                            </div>
                        </div>
                        <div class="bi_tishi" id="badgeInfo"></div>
                        <button  id="" class="btn-receive getXZ" onclick="HasXunZhang(this)" style="margin-left: 220px;background-color: #4c84e9;"></button>
                       <br>
                         <span class="reward-info"  style="margin-left: 180px;">可以额外领取<img src="/img/integral.png">200积分,20经验，2威望</span>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

</body>
<script>

    $(function () {
        $('[data-toggle="tooltip"]').tooltip()
    })
    //更新签名
    $("#signature").blur(function () {
        var signature=$("#signature").val();
        $.get("/modifeSignature",{"signature":signature},function (data) {
            console.log(data);
        });

    });


    //提示
    $(function () {
        $('[data-toggle="tooltip"]').tooltip()
    })


    //查看密码
    $("#lookPass").click(function () {
        $.get("/lookPass",function (data) {
            console.log(data.user);
            if(data.vectiy!=null){
                $("#lookPass2").val("密码已经发到你的邮箱,情趣查看");
                console.log(data.vectiy);
            }

        });
    });

    //修改昵称
    $("#modifiedName").blur(function () {
        var modifiedName=$("#modifiedName").val();
        $.get("/modifiedName",{"modifiedName":modifiedName},function (data) {
            console.log(data);
            if(data=='failed'){
                $("#hasName").text("昵称已经存在，请换一个吧");
                return false;
            }
            if(data=='succes'){
                $("#hasName").text("");
                return false;
            }
        });
    });



    $("#button").click(function () {
        var form = new FormData();
        form.append("editormd-image-file", document.getElementById("file").files[0]);
        $.ajax({
            url: "/file/head",    //后台url
            data: form,
            cache: false,
            async: false,
            type: "POST",          //类型，POST或者GET
            dataType: 'json',       //数据返回类型，可以是xml、json等
            processData: false,
            contentType: false,
            success: function (data) {   //成功，回调函数
               console.log(data);
               $("#url img").attr("src",data.url);
                $("#button").hide();
            },

        });
    })
    //自动更新时间的插件
    var timeagoInstance = timeago();// 实例
    timeagoInstance.render(document.querySelectorAll('.time'),'zh_CN');

    //搜索
    $(".lianhe_seach").keyup(function (){
        var inputMes =$(".lianhe_seach").val();
        $.get("/searchValue",{"inputMes":inputMes},function (data) {
            console.log(data.length)
            if(data.length!=0){
                $("#apeendChoice").empty();
                for(var i=0;i<data.length;i++){
                    $("#apeendChoice").append("<li><b><a href='#' onclick='getSlectValues(this)' style='color: black;margin-top: 10px;font-size: 15px;'>"+data[i].title+"</a></b></li>" +
                        "<br>")
                }
            }else {
                $("#apeendChoice").append("");

            }
        });


    });
    function getSlectValues(e) {
        var text = $(e).text();
        $(".lianhe_seach").val(text);
    }
</script>
</html>